<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>订单管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			//$("#name").focus();
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/phy/tOrder/">订单列表</a></li>
		<li class="active"><a href="${ctx}/phy/tOrder/form?id=${tOrder.id}">订单<shiro:hasPermission name="phy:tOrder:edit">${not empty tOrder.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="phy:tOrder:edit">查看</shiro:lacksPermission></a></li>
	</ul><br/>
	<form:form id="inputForm" modelAttribute="tOrder" action="${ctx}/phy/tOrder/save" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<sys:message content="${message}"/>

		<div class="control-group">
			<label class="control-label">订单号：</label>
			<div class="controls">
				<form:input path="orderNo" htmlEscape="false" maxlength="32" class="input-medium required"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<div style="display:inline-block">
				<label class="control-label">机构名称：</label>
				<div class="controls">
					<form:input path="tenantName" htmlEscape="false" maxlength="64" class="input-medium required"/>
					<span class="help-inline"><font color="red">*</font> </span>
				</div>
			</div>
			<div style="display:inline-block">
				<label class="control-label">机构地址：</label>
				<div class="controls">
					<form:input path="tenantAddress" htmlEscape="false" maxlength="64" class="input-xlarge required"/>
					<span class="help-inline"><font color="red">*</font> </span>
				</div>
			</div>
		</div>

		<div class="control-group">
			<div style="display:inline-block">
				<label class="control-label">就诊人姓名：</label>
				<div class="controls">
					<form:input path="patientName" htmlEscape="false" maxlength="64" class="input-medium required"/>
					<span class="help-inline"><font color="red">*</font> </span>
				</div>
			</div>
			<div style="display:inline-block">
				<label class="control-label">就诊人电话：</label>
				<div class="controls">
					<form:input path="patientMobile" htmlEscape="false" maxlength="64" class="input-medium required"/>
					<span class="help-inline"><font color="red">*</font> </span>
				</div>
			</div>

		</div>

		<div class="control-group">
			<div style="display:inline-block">
				<label class="control-label">就诊人身份证：</label>
				<div class="controls">
					<form:input path="patientCard" htmlEscape="false" maxlength="64" class="input-medium required"/>
					<span class="help-inline"><font color="red">*</font> </span>
				</div>
			</div>
			<div style="display:inline-block">
				<label class="control-label">就诊人地址：</label>
				<div class="controls">
					<form:input path="patientAddress" htmlEscape="false" maxlength="64" class="input-xlarge required"/>
					<span class="help-inline"><font color="red">*</font> </span>
				</div>
			</div>

		</div>
		<div class="control-group">
			<div style="display:inline-block">
				<label class="control-label">医生名称：</label>
				<div class="controls">
					<form:input path="doctorName" htmlEscape="false" maxlength="64" class="input-medium required"/>
					<span class="help-inline"><font color="red">*</font> </span>
				</div>
			</div>
			<div style="display:inline-block">
				<label class="control-label">科室名称：</label>
				<div class="controls">
					<form:input path="officeName" htmlEscape="false" maxlength="64" class="input-medium required"/>
					<span class="help-inline"><font color="red">*</font> </span>
				</div>
			</div>
			<div style="display:inline-block">
				<label class="control-label">职称名称：</label>
				<div class="controls">
					<form:input path="rankName" htmlEscape="false" maxlength="64" class="input-medium required"/>
					<span class="help-inline"><font color="red">*</font> </span>
				</div>
			</div>
		</div>

		<div class="control-group">
			<label class="control-label">订单类型：</label>
			<div class="controls">
				<form:select path="type" class="input-small required" >
					<form:option value="" label=""/>
					<form:options items="${fns:getDictList('order_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>

<%--		<div class="control-group">--%>
<%--			<label class="control-label">线上咨询类型：</label>--%>
<%--			<div class="controls">--%>
<%--				<form:select path="type" class="input-mini required" >--%>
<%--					<form:option value="" label=""/>--%>
<%--					<form:options items="${fns:getDictList('order_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>--%>
<%--				</form:select>--%>
<%--				<span class="help-inline"><font color="red">*</font> </span>--%>
<%--			</div>--%>
<%--		</div>--%>

		<div class="control-group">
			<label class="control-label">订单状态：</label>
			<div class="controls">
				<form:select path="status" class="input-small required" >
					<form:option value="" label=""/>
					<form:options items="${fns:getDictList('order_status')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>

		<div class="control-group">
			<label class="control-label">预约就诊时间：</label>
			<div class="controls">
				<input name="bookDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"
					value="<fmt:formatDate value="${tOrder.bookDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>

		<div class="control-group">
			<label class="control-label">具体时间：</label>
			<div class="controls">
				<form:input path="bookDateDetail" htmlEscape="false" maxlength="64" class="input-medium required"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
<%--		<div class="control-group">--%>
<%--			<label class="control-label">支付金额：</label>--%>
<%--			<div class="controls">--%>
<%--				<form:input path="payAmount" htmlEscape="false" class="input-xlarge "/>--%>
<%--			</div>--%>
<%--		</div>--%>
<%--		<div class="control-group">--%>
<%--			<label class="control-label">支付时间：</label>--%>
<%--			<div class="controls">--%>
<%--				<input name="payDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "--%>
<%--					value="<fmt:formatDate value="${tOrder.payDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"--%>
<%--					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>--%>
<%--			</div>--%>
<%--		</div>--%>
		<div class="control-group">
			<label class="control-label">备注信息：</label>
			<div class="controls">
				<form:textarea path="remarks" htmlEscape="false" rows="4" maxlength="255" class="input-xxlarge "/>
			</div>
		</div>
		<div class="form-actions">
<%--			<shiro:hasPermission name="phy:tOrder:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;</shiro:hasPermission>--%>
			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
		</div>
	</form:form>
</body>
</html>
